<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    let arr = [4,3,1,6,98,7,8].sort((a,b)=>{
        return b-a;
    })
    console.log(arr);
</script>
</body>
</html>